package com.md.api.dao;

import com.md.api.entity.DayHasMot;
import com.md.api.entity.SiteServicePredetermineRecord;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface SiteServicePredetermineRecordMapper {

    int insert(SiteServicePredetermineRecord record);

    List<SiteServicePredetermineRecord> selectAll();

    int plusPredetermineCount(@Param("predetermineId")String predetermineId);

    List<SiteServicePredetermineRecord> getByServiceIdAndDate(@Param("serviceId") String serviceId, @Param("predetermineDate") Date predetermineDate, @Param("isToday")Integer isToday);
    SiteServicePredetermineRecord getByPredetermineId(@Param("predetermineId")String predetermineId);

    String getMaxDate(@Param("serviceId")String serviceId);

    int subtractPredetermineCount(@Param("predetermineId")String predetermineId);

    int deleteByServiceId(@Param("serviceId")String serviceId);

    List<DayHasMot> dayHasMot();
}